home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2002 January / maximum-cd-2002-01.iso / Files / Mechwarrior 4 Mapping / MW4Editor.exe / content / ABLScripts / GenericScripts / startmissionScript.ABL < prev    next >
Encoding:
Text File  |  2001-07-16  |  2.8 KB  |  173 lines

  1.  
  2. //*********************************************************************************
  3.  
  4. fsm GENERIC : integer;        
  5.  
  6. //------------------------------------------------------------------
  7. //
  8. //     Constant Definitions
  9. //
  10. //------------------------------------------------------------------
  11.      const
  12.  
  13.         #include_ <content\ABLScripts\mwconst.abi>
  14. //------------------------------------------------------------------
  15. //
  16. //     Type Definitions
  17. //
  18. //------------------------------------------------------------------
  19.      type
  20.  
  21.         #include_ <content\ABLScripts\mwtype.abi>
  22.  
  23. //------------------------------------------------------------------
  24. //
  25. //     Variable Declarations
  26. //
  27. //------------------------------------------------------------------
  28.       var
  29.             
  30.         eternal integer playermech;
  31.         
  32.         
  33.         static integer    cinema_cut;
  34.         
  35.  //------------------------------------------------------------------
  36. //
  37. //     Init Function    (automatically run first time through)
  38. //
  39. //------------------------------------------------------------------
  40.  
  41. function init;
  42.     var
  43.         integer i;
  44.  
  45.     code
  46.  
  47.          playermech = getplayervehicle(epl_player0);    
  48.      
  49.             GroupAddObject(GroupObjectId(1),playermech);
  50.  
  51.  
  52.             //GroupAddObject(GroupObjectId(X),eve_SOMETHING);
  53.             
  54.             //SetGroupAI(groupobjectid(X),GROUPAI_MOODSQUAD);
  55.     
  56.          
  57.         cinema_cut = 0;                         
  58.         
  59. endfunction;
  60.  
  61. //------------------------------------------------------------------
  62. //
  63. //     Main Code
  64. //
  65. //------------------------------------------------------------------
  66. state startState;
  67.  
  68.     code    
  69.             //playsound(eso_start);
  70.             //setactivationdistance(6800);
  71.             //trans opening;
  72.             trans sit;
  73.  
  74. endstate;
  75.  
  76.     
  77. state deadState;
  78.     code
  79. endstate;
  80.     
  81. //------------------------------------------------------------------
  82. //
  83. //     Sit state : description
  84. //
  85. //------------------------------------------------------------------
  86. state sit;
  87.  
  88.     code
  89.     
  90.             
  91. //Reveal the objectives
  92.  
  93. //Fail the mission when the player dies
  94.     if (isdead(playermech)) then
  95.         failobjectiveall(9);
  96.     endif;
  97.  
  98.                 
  99. endstate;
  100.  
  101. //-----------------------------------------
  102. //HERE THERE BE CINEMAS
  103. //-----------------------------------------
  104.  
  105. state opening;
  106.  
  107.     code
  108.  
  109.      switch (cinema_cut)
  110.             
  111.             case 0:
  112.  
  113.             endcase;
  114.             
  115.             case 1:
  116.                                                     
  117.             endcase;
  118.  
  119.             case 2:
  120.                                         
  121.             endcase;
  122.             
  123.                 case 3:
  124.                 
  125.             endcase;
  126.             
  127.         endswitch;
  128.  
  129.     
  130.     
  131. endstate;
  132.  
  133. state won;
  134.  
  135.         code
  136.         
  137.         switch cinema_cut
  138.         
  139.             case 0:    
  140.             
  141.             endcase;
  142.             
  143.             case 1:
  144.             
  145.             endcase;
  146.             
  147.         endswitch;
  148.     
  149. endstate;
  150.  
  151. state lost;
  152.  
  153.         code
  154.         
  155.         switch cinema_cut
  156.         
  157.             case 0:    
  158.             
  159.             endcase;
  160.             
  161.             case 1:
  162.             
  163.             endcase;
  164.             
  165.         endswitch;
  166.     
  167. endstate;
  168.  
  169.  
  170. endfsm.
  171. //******************************************************************
  172.  
  173.